package middleware

import "github.com/gin-gonic/gin"

func Logger() gin.HandlerFunc {
	if gin.Mode() == gin.DebugMode {
		return gin.LoggerWithConfig(gin.LoggerConfig{})
	}

	return func(ctx *gin.Context) {
		ctx.Next()
	}
}
